<?php
if (session_id() == "") session_start(); // Initialize Session data
ob_start(); // Turn on output buffering
?>
<?php include_once "ewcfg10.php" ?>
<?php include_once "ewmysql10.php" ?>
<?php include_once "phpfn10.php" ?>
<?php include_once "veh_vehiculosinfo.php" ?>
<?php include_once "usuariosinfo.php" ?>
<?php include_once "userfn10.php" ?>
<?php

//
// Page class
//

$veh_vehiculos_delete = NULL; // Initialize page object first

class cveh_vehiculos_delete extends cveh_vehiculos {

	// Page ID
	var $PageID = 'delete';

	// Project ID
	var $ProjectID = "{0CD3A63A-80C7-457D-BA57-0B97D2A745A8}";

	// Table name
	var $TableName = 'veh_vehiculos';

	// Page object name
	var $PageObjName = 'veh_vehiculos_delete';

	// Page name
	function PageName() {
		return ew_CurrentPage();
	}

	// Page URL
	function PageUrl() {
		$PageUrl = ew_CurrentPage() . "?";
		if ($this->UseTokenInUrl) $PageUrl .= "t=" . $this->TableVar . "&"; // Add page token
		return $PageUrl;
	}

	// Message
	function getMessage() {
		return @$_SESSION[EW_SESSION_MESSAGE];
	}

	function setMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_MESSAGE], $v);
	}

	function getFailureMessage() {
		return @$_SESSION[EW_SESSION_FAILURE_MESSAGE];
	}

	function setFailureMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_FAILURE_MESSAGE], $v);
	}

	function getSuccessMessage() {
		return @$_SESSION[EW_SESSION_SUCCESS_MESSAGE];
	}

	function setSuccessMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_SUCCESS_MESSAGE], $v);
	}

	function getWarningMessage() {
		return @$_SESSION[EW_SESSION_WARNING_MESSAGE];
	}

	function setWarningMessage($v) {
		ew_AddMessage($_SESSION[EW_SESSION_WARNING_MESSAGE], $v);
	}

	// Show message
	function ShowMessage() {
		$hidden = FALSE;
		$html = "";

		// Message
		$sMessage = $this->getMessage();
		$this->Message_Showing($sMessage, "");
		if ($sMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sMessage;
			$html .= "<div class=\"alert alert-success ewSuccess\">" . $sMessage . "</div>";
			$_SESSION[EW_SESSION_MESSAGE] = ""; // Clear message in Session
		}

		// Warning message
		$sWarningMessage = $this->getWarningMessage();
		$this->Message_Showing($sWarningMessage, "warning");
		if ($sWarningMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sWarningMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sWarningMessage;
			$html .= "<div class=\"alert alert-warning ewWarning\">" . $sWarningMessage . "</div>";
			$_SESSION[EW_SESSION_WARNING_MESSAGE] = ""; // Clear message in Session
		}

		// Success message
		$sSuccessMessage = $this->getSuccessMessage();
		$this->Message_Showing($sSuccessMessage, "success");
		if ($sSuccessMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sSuccessMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sSuccessMessage;
			$html .= "<div class=\"alert alert-success ewSuccess\">" . $sSuccessMessage . "</div>";
			$_SESSION[EW_SESSION_SUCCESS_MESSAGE] = ""; // Clear message in Session
		}

		// Failure message
		$sErrorMessage = $this->getFailureMessage();
		$this->Message_Showing($sErrorMessage, "failure");
		if ($sErrorMessage <> "") { // Message in Session, display
			if (!$hidden)
				$sErrorMessage = "<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>" . $sErrorMessage;
			$html .= "<div class=\"alert alert-error ewError\">" . $sErrorMessage . "</div>";
			$_SESSION[EW_SESSION_FAILURE_MESSAGE] = ""; // Clear message in Session
		}
		echo "<table class=\"ewStdTable\"><tr><td><div class=\"ewMessageDialog\"" . (($hidden) ? " style=\"display: none;\"" : "") . ">" . $html . "</div></td></tr></table>";
	}
	var $PageHeader;
	var $PageFooter;

	// Show Page Header
	function ShowPageHeader() {
		$sHeader = $this->PageHeader;
		$this->Page_DataRendering($sHeader);
		if ($sHeader <> "") { // Header exists, display
			echo "<p>" . $sHeader . "</p>";
		}
	}

	// Show Page Footer
	function ShowPageFooter() {
		$sFooter = $this->PageFooter;
		$this->Page_DataRendered($sFooter);
		if ($sFooter <> "") { // Footer exists, display
			echo "<p>" . $sFooter . "</p>";
		}
	}

	// Validate page request
	function IsPageRequest() {
		global $objForm;
		if ($this->UseTokenInUrl) {
			if ($objForm)
				return ($this->TableVar == $objForm->GetValue("t"));
			if (@$_GET["t"] <> "")
				return ($this->TableVar == $_GET["t"]);
		} else {
			return TRUE;
		}
	}

	//
	// Page class constructor
	//
	function __construct() {
		global $conn, $Language;
		$GLOBALS["Page"] = &$this;

		// Language object
		if (!isset($Language)) $Language = new cLanguage();

		// Parent constuctor
		parent::__construct();

		// Table object (veh_vehiculos)
		if (!isset($GLOBALS["veh_vehiculos"]) || get_class($GLOBALS["veh_vehiculos"]) == "cveh_vehiculos") {
			$GLOBALS["veh_vehiculos"] = &$this;
			$GLOBALS["Table"] = &$GLOBALS["veh_vehiculos"];
		}

		// Table object (usuarios)
		if (!isset($GLOBALS['usuarios'])) $GLOBALS['usuarios'] = new cusuarios();

		// Page ID
		if (!defined("EW_PAGE_ID"))
			define("EW_PAGE_ID", 'delete', TRUE);

		// Table name (for backward compatibility)
		if (!defined("EW_TABLE_NAME"))
			define("EW_TABLE_NAME", 'veh_vehiculos', TRUE);

		// Start timer
		if (!isset($GLOBALS["gTimer"])) $GLOBALS["gTimer"] = new cTimer();

		// Open connection
		if (!isset($conn)) $conn = ew_Connect();
	}

	// 
	//  Page_Init
	//
	function Page_Init() {
		global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;

		// Security
		$Security = new cAdvancedSecurity();
		if (!$Security->IsLoggedIn()) $Security->AutoLogin();
		if (!$Security->IsLoggedIn()) {
			$Security->SaveLastUrl();
			$this->Page_Terminate("login.php");
		}
		$this->CurrentAction = (@$_GET["a"] <> "") ? $_GET["a"] : @$_POST["a_list"]; // Set up current action
		$this->VehiculoId->Visible = !$this->IsAdd() && !$this->IsCopy() && !$this->IsGridAdd();

		// Global Page Loading event (in userfn*.php)
		Page_Loading();

		// Page Load event
		$this->Page_Load();
	}

	//
	// Page_Terminate
	//
	function Page_Terminate($url = "") {
		global $conn;

		// Page Unload event
		$this->Page_Unload();

		// Global Page Unloaded event (in userfn*.php)
		Page_Unloaded();
		$this->Page_Redirecting($url);

		 // Close connection
		$conn->Close();

		// Go to URL if specified
		if ($url <> "") {
			if (!EW_DEBUG_ENABLED && ob_get_length())
				ob_end_clean();
			header("Location: " . $url);
		}
		exit();
	}
	var $TotalRecs = 0;
	var $RecCnt;
	var $RecKeys = array();
	var $Recordset;
	var $StartRowCnt = 1;
	var $RowCnt = 0;

	//
	// Page main
	//
	function Page_Main() {
		global $Language;

		// Set up Breadcrumb
		$this->SetupBreadcrumb();

		// Load key parameters
		$this->RecKeys = $this->GetRecordKeys(); // Load record keys
		$sFilter = $this->GetKeyFilter();
		if ($sFilter == "")
			$this->Page_Terminate("veh_vehiculoslist.php"); // Prevent SQL injection, return to list

		// Set up filter (SQL WHHERE clause) and get return SQL
		// SQL constructor in veh_vehiculos class, veh_vehiculosinfo.php

		$this->CurrentFilter = $sFilter;

		// Get action
		if (@$_POST["a_delete"] <> "") {
			$this->CurrentAction = $_POST["a_delete"];
		} else {
			$this->CurrentAction = "I"; // Display record
		}
		switch ($this->CurrentAction) {
			case "D": // Delete
				$this->SendEmail = TRUE; // Send email on delete success
				if ($this->DeleteRows()) { // Delete rows
					if ($this->getSuccessMessage() == "")
						$this->setSuccessMessage($Language->Phrase("DeleteSuccess")); // Set up success message
					$this->Page_Terminate($this->getReturnUrl()); // Return to caller
				}
		}
	}

// No functions
	// Load recordset
	function LoadRecordset($offset = -1, $rowcnt = -1) {
		global $conn;

		// Call Recordset Selecting event
		$this->Recordset_Selecting($this->CurrentFilter);

		// Load List page SQL
		$sSql = $this->SelectSQL();
		if ($offset > -1 && $rowcnt > -1)
			$sSql .= " LIMIT $rowcnt OFFSET $offset";

		// Load recordset
		$rs = ew_LoadRecordset($sSql);

		// Call Recordset Selected event
		$this->Recordset_Selected($rs);
		return $rs;
	}

	// Load row based on key values
	function LoadRow() {
		global $conn, $Security, $Language;
		$sFilter = $this->KeyFilter();

		// Call Row Selecting event
		$this->Row_Selecting($sFilter);

		// Load SQL based on filter
		$this->CurrentFilter = $sFilter;
		$sSql = $this->SQL();
		$res = FALSE;
		$rs = ew_LoadRecordset($sSql);
		if ($rs && !$rs->EOF) {
			$res = TRUE;
			$this->LoadRowValues($rs); // Load row values
			$rs->Close();
		}
		return $res;
	}

	// Load row values from recordset
	function LoadRowValues(&$rs) {
		global $conn;
		if (!$rs || $rs->EOF) return;

		// Call Row Selected event
		$row = &$rs->fields;
		$this->Row_Selected($row);
		$this->VehiculoId->setDbValue($rs->fields('VehiculoId'));
		$this->VehiculoDominio->setDbValue($rs->fields('VehiculoDominio'));
		$this->VehiculoTipo->setDbValue($rs->fields('VehiculoTipo'));
		$this->VehiculoDescripcion->setDbValue($rs->fields('VehiculoDescripcion'));
		$this->VehiculoSucursal->setDbValue($rs->fields('VehiculoSucursal'));
		$this->VehiculoFechaCompra->setDbValue($rs->fields('VehiculoFechaCompra'));
		$this->VehiculoProveedor->setDbValue($rs->fields('VehiculoProveedor'));
		$this->VehiculoMarca->setDbValue($rs->fields('VehiculoMarca'));
		$this->VehiculoModelo->setDbValue($rs->fields('VehiculoModelo'));
		$this->VehiculoVersion->setDbValue($rs->fields('VehiculoVersion'));
		$this->VehiculoChasis->setDbValue($rs->fields('VehiculoChasis'));
		$this->VehiculoMotor->setDbValue($rs->fields('VehiculoMotor'));
		$this->VehiculoCombustible->setDbValue($rs->fields('VehiculoCombustible'));
		$this->VehiculoTipoMedicion->setDbValue($rs->fields('VehiculoTipoMedicion'));
		$this->VehiculoCondicion->setDbValue($rs->fields('VehiculoCondicion'));
		$this->VehiculoKm->setDbValue($rs->fields('VehiculoKm'));
		$this->VehiculoFotoPrincipal->Upload->DbValue = $rs->fields('VehiculoFotoPrincipal');
		$this->VehiculoFotoPrincipal->CurrentValue = $this->VehiculoFotoPrincipal->Upload->DbValue;
		$this->VehiculoFoto2->Upload->DbValue = $rs->fields('VehiculoFoto2');
		$this->VehiculoFoto2->CurrentValue = $this->VehiculoFoto2->Upload->DbValue;
		$this->VehiculoFoto3->Upload->DbValue = $rs->fields('VehiculoFoto3');
		$this->VehiculoFoto3->CurrentValue = $this->VehiculoFoto3->Upload->DbValue;
		$this->VehiculoFoto4->Upload->DbValue = $rs->fields('VehiculoFoto4');
		$this->VehiculoFoto4->CurrentValue = $this->VehiculoFoto4->Upload->DbValue;
		$this->VehiculoFechaBaja->setDbValue($rs->fields('VehiculoFechaBaja'));
		$this->VehiculoMotivoBaja->setDbValue($rs->fields('VehiculoMotivoBaja'));
	}

	// Load DbValue from recordset
	function LoadDbValues(&$rs) {
		if (!$rs || !is_array($rs) && $rs->EOF) return;
		$row = is_array($rs) ? $rs : $rs->fields;
		$this->VehiculoId->DbValue = $row['VehiculoId'];
		$this->VehiculoDominio->DbValue = $row['VehiculoDominio'];
		$this->VehiculoTipo->DbValue = $row['VehiculoTipo'];
		$this->VehiculoDescripcion->DbValue = $row['VehiculoDescripcion'];
		$this->VehiculoSucursal->DbValue = $row['VehiculoSucursal'];
		$this->VehiculoFechaCompra->DbValue = $row['VehiculoFechaCompra'];
		$this->VehiculoProveedor->DbValue = $row['VehiculoProveedor'];
		$this->VehiculoMarca->DbValue = $row['VehiculoMarca'];
		$this->VehiculoModelo->DbValue = $row['VehiculoModelo'];
		$this->VehiculoVersion->DbValue = $row['VehiculoVersion'];
		$this->VehiculoChasis->DbValue = $row['VehiculoChasis'];
		$this->VehiculoMotor->DbValue = $row['VehiculoMotor'];
		$this->VehiculoCombustible->DbValue = $row['VehiculoCombustible'];
		$this->VehiculoTipoMedicion->DbValue = $row['VehiculoTipoMedicion'];
		$this->VehiculoCondicion->DbValue = $row['VehiculoCondicion'];
		$this->VehiculoKm->DbValue = $row['VehiculoKm'];
		$this->VehiculoFotoPrincipal->Upload->DbValue = $row['VehiculoFotoPrincipal'];
		$this->VehiculoFoto2->Upload->DbValue = $row['VehiculoFoto2'];
		$this->VehiculoFoto3->Upload->DbValue = $row['VehiculoFoto3'];
		$this->VehiculoFoto4->Upload->DbValue = $row['VehiculoFoto4'];
		$this->VehiculoFechaBaja->DbValue = $row['VehiculoFechaBaja'];
		$this->VehiculoMotivoBaja->DbValue = $row['VehiculoMotivoBaja'];
	}

	// Render row values based on field settings
	function RenderRow() {
		global $conn, $Security, $Language;
		global $gsLanguage;

		// Initialize URLs
		// Call Row_Rendering event

		$this->Row_Rendering();

		// Common render codes for all row types
		// VehiculoId
		// VehiculoDominio
		// VehiculoTipo
		// VehiculoDescripcion
		// VehiculoSucursal
		// VehiculoFechaCompra
		// VehiculoProveedor
		// VehiculoMarca
		// VehiculoModelo
		// VehiculoVersion
		// VehiculoChasis
		// VehiculoMotor
		// VehiculoCombustible
		// VehiculoTipoMedicion
		// VehiculoCondicion
		// VehiculoKm
		// VehiculoFotoPrincipal
		// VehiculoFoto2
		// VehiculoFoto3
		// VehiculoFoto4
		// VehiculoFechaBaja
		// VehiculoMotivoBaja

		if ($this->RowType == EW_ROWTYPE_VIEW) { // View row

			// VehiculoId
			$this->VehiculoId->ViewValue = $this->VehiculoId->CurrentValue;
			$this->VehiculoId->ViewCustomAttributes = "";

			// VehiculoDominio
			$this->VehiculoDominio->ViewValue = $this->VehiculoDominio->CurrentValue;
			$this->VehiculoDominio->ViewCustomAttributes = "";

			// VehiculoTipo
			if (strval($this->VehiculoTipo->CurrentValue) <> "") {
				$sFilterWrk = "`TipoId`" . ew_SearchString("=", $this->VehiculoTipo->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `TipoId`, `TipoNombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `veh_tipo`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->VehiculoTipo, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->VehiculoTipo->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->VehiculoTipo->ViewValue = $this->VehiculoTipo->CurrentValue;
				}
			} else {
				$this->VehiculoTipo->ViewValue = NULL;
			}
			$this->VehiculoTipo->ViewCustomAttributes = "";

			// VehiculoDescripcion
			$this->VehiculoDescripcion->ViewValue = $this->VehiculoDescripcion->CurrentValue;
			$this->VehiculoDescripcion->ViewCustomAttributes = "";

			// VehiculoSucursal
			if (strval($this->VehiculoSucursal->CurrentValue) <> "") {
				$sFilterWrk = "`sucursalId`" . ew_SearchString("=", $this->VehiculoSucursal->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `sucursalId`, `sucursalNombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `sucursales`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->VehiculoSucursal, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->VehiculoSucursal->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->VehiculoSucursal->ViewValue = $this->VehiculoSucursal->CurrentValue;
				}
			} else {
				$this->VehiculoSucursal->ViewValue = NULL;
			}
			$this->VehiculoSucursal->ViewCustomAttributes = "";

			// VehiculoFechaCompra
			$this->VehiculoFechaCompra->ViewValue = $this->VehiculoFechaCompra->CurrentValue;
			$this->VehiculoFechaCompra->ViewValue = ew_FormatDateTime($this->VehiculoFechaCompra->ViewValue, 7);
			$this->VehiculoFechaCompra->ViewCustomAttributes = "";

			// VehiculoProveedor
			if (strval($this->VehiculoProveedor->CurrentValue) <> "") {
				$sFilterWrk = "`ProveedorId`" . ew_SearchString("=", $this->VehiculoProveedor->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `ProveedorId`, `ProveedorNombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `veh_proveedores`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->VehiculoProveedor, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->VehiculoProveedor->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->VehiculoProveedor->ViewValue = $this->VehiculoProveedor->CurrentValue;
				}
			} else {
				$this->VehiculoProveedor->ViewValue = NULL;
			}
			$this->VehiculoProveedor->ViewCustomAttributes = "";

			// VehiculoMarca
			if (strval($this->VehiculoMarca->CurrentValue) <> "") {
				$sFilterWrk = "`MarcaId`" . ew_SearchString("=", $this->VehiculoMarca->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `MarcaId`, `MarcaNombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `veh_marca`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->VehiculoMarca, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->VehiculoMarca->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->VehiculoMarca->ViewValue = $this->VehiculoMarca->CurrentValue;
				}
			} else {
				$this->VehiculoMarca->ViewValue = NULL;
			}
			$this->VehiculoMarca->ViewCustomAttributes = "";

			// VehiculoModelo
			if (strval($this->VehiculoModelo->CurrentValue) <> "") {
				$sFilterWrk = "`ModeloId`" . ew_SearchString("=", $this->VehiculoModelo->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `ModeloId`, `ModeloNombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `veh_modelo`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->VehiculoModelo, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->VehiculoModelo->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->VehiculoModelo->ViewValue = $this->VehiculoModelo->CurrentValue;
				}
			} else {
				$this->VehiculoModelo->ViewValue = NULL;
			}
			$this->VehiculoModelo->ViewCustomAttributes = "";

			// VehiculoVersion
			if (strval($this->VehiculoVersion->CurrentValue) <> "") {
				$sFilterWrk = "`VersionId`" . ew_SearchString("=", $this->VehiculoVersion->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `VersionId`, `VersionNombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `veh_version`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->VehiculoVersion, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->VehiculoVersion->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->VehiculoVersion->ViewValue = $this->VehiculoVersion->CurrentValue;
				}
			} else {
				$this->VehiculoVersion->ViewValue = NULL;
			}
			$this->VehiculoVersion->ViewCustomAttributes = "";

			// VehiculoChasis
			$this->VehiculoChasis->ViewValue = $this->VehiculoChasis->CurrentValue;
			$this->VehiculoChasis->ViewCustomAttributes = "";

			// VehiculoMotor
			$this->VehiculoMotor->ViewValue = $this->VehiculoMotor->CurrentValue;
			$this->VehiculoMotor->ViewCustomAttributes = "";

			// VehiculoCombustible
			if (strval($this->VehiculoCombustible->CurrentValue) <> "") {
				$sFilterWrk = "`CombustibleId`" . ew_SearchString("=", $this->VehiculoCombustible->CurrentValue, EW_DATATYPE_NUMBER);
			$sSqlWrk = "SELECT `CombustibleId`, `CombustibleNombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `veh_combustible`";
			$sWhereWrk = "";
			if ($sFilterWrk <> "") {
				ew_AddFilter($sWhereWrk, $sFilterWrk);
			}

			// Call Lookup selecting
			$this->Lookup_Selecting($this->VehiculoCombustible, $sWhereWrk);
			if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
				$rswrk = $conn->Execute($sSqlWrk);
				if ($rswrk && !$rswrk->EOF) { // Lookup values found
					$this->VehiculoCombustible->ViewValue = $rswrk->fields('DispFld');
					$rswrk->Close();
				} else {
					$this->VehiculoCombustible->ViewValue = $this->VehiculoCombustible->CurrentValue;
				}
			} else {
				$this->VehiculoCombustible->ViewValue = NULL;
			}
			$this->VehiculoCombustible->ViewCustomAttributes = "";

			// VehiculoTipoMedicion
			if (strval($this->VehiculoTipoMedicion->CurrentValue) <> "") {
				switch ($this->VehiculoTipoMedicion->CurrentValue) {
					case $this->VehiculoTipoMedicion->FldTagValue(1):
						$this->VehiculoTipoMedicion->ViewValue = $this->VehiculoTipoMedicion->FldTagCaption(1) <> "" ? $this->VehiculoTipoMedicion->FldTagCaption(1) : $this->VehiculoTipoMedicion->CurrentValue;
						break;
					case $this->VehiculoTipoMedicion->FldTagValue(2):
						$this->VehiculoTipoMedicion->ViewValue = $this->VehiculoTipoMedicion->FldTagCaption(2) <> "" ? $this->VehiculoTipoMedicion->FldTagCaption(2) : $this->VehiculoTipoMedicion->CurrentValue;
						break;
					case $this->VehiculoTipoMedicion->FldTagValue(3):
						$this->VehiculoTipoMedicion->ViewValue = $this->VehiculoTipoMedicion->FldTagCaption(3) <> "" ? $this->VehiculoTipoMedicion->FldTagCaption(3) : $this->VehiculoTipoMedicion->CurrentValue;
						break;
					default:
						$this->VehiculoTipoMedicion->ViewValue = $this->VehiculoTipoMedicion->CurrentValue;
				}
			} else {
				$this->VehiculoTipoMedicion->ViewValue = NULL;
			}
			$this->VehiculoTipoMedicion->ViewCustomAttributes = "";

			// VehiculoCondicion
			if (strval($this->VehiculoCondicion->CurrentValue) <> "") {
				switch ($this->VehiculoCondicion->CurrentValue) {
					case $this->VehiculoCondicion->FldTagValue(1):
						$this->VehiculoCondicion->ViewValue = $this->VehiculoCondicion->FldTagCaption(1) <> "" ? $this->VehiculoCondicion->FldTagCaption(1) : $this->VehiculoCondicion->CurrentValue;
						break;
					case $this->VehiculoCondicion->FldTagValue(2):
						$this->VehiculoCondicion->ViewValue = $this->VehiculoCondicion->FldTagCaption(2) <> "" ? $this->VehiculoCondicion->FldTagCaption(2) : $this->VehiculoCondicion->CurrentValue;
						break;
					default:
						$this->VehiculoCondicion->ViewValue = $this->VehiculoCondicion->CurrentValue;
				}
			} else {
				$this->VehiculoCondicion->ViewValue = NULL;
			}
			$this->VehiculoCondicion->ViewCustomAttributes = "";

			// VehiculoKm
			$this->VehiculoKm->ViewValue = $this->VehiculoKm->CurrentValue;
			$this->VehiculoKm->ViewCustomAttributes = "";

			// VehiculoFotoPrincipal
			if (!ew_Empty($this->VehiculoFotoPrincipal->Upload->DbValue)) {
				$this->VehiculoFotoPrincipal->ViewValue = $this->VehiculoFotoPrincipal->Upload->DbValue;
			} else {
				$this->VehiculoFotoPrincipal->ViewValue = "";
			}
			$this->VehiculoFotoPrincipal->ViewCustomAttributes = "";

			// VehiculoFoto2
			if (!ew_Empty($this->VehiculoFoto2->Upload->DbValue)) {
				$this->VehiculoFoto2->ViewValue = $this->VehiculoFoto2->Upload->DbValue;
			} else {
				$this->VehiculoFoto2->ViewValue = "";
			}
			$this->VehiculoFoto2->ViewCustomAttributes = "";

			// VehiculoFoto3
			if (!ew_Empty($this->VehiculoFoto3->Upload->DbValue)) {
				$this->VehiculoFoto3->ViewValue = $this->VehiculoFoto3->Upload->DbValue;
			} else {
				$this->VehiculoFoto3->ViewValue = "";
			}
			$this->VehiculoFoto3->ViewCustomAttributes = "";

			// VehiculoFoto4
			if (!ew_Empty($this->VehiculoFoto4->Upload->DbValue)) {
				$this->VehiculoFoto4->ViewValue = $this->VehiculoFoto4->Upload->DbValue;
			} else {
				$this->VehiculoFoto4->ViewValue = "";
			}
			$this->VehiculoFoto4->ViewCustomAttributes = "";

			// VehiculoFechaBaja
			$this->VehiculoFechaBaja->ViewValue = $this->VehiculoFechaBaja->CurrentValue;
			$this->VehiculoFechaBaja->ViewValue = ew_FormatDateTime($this->VehiculoFechaBaja->ViewValue, 7);
			$this->VehiculoFechaBaja->ViewCustomAttributes = "";

			// VehiculoMotivoBaja
			$this->VehiculoMotivoBaja->ViewValue = $this->VehiculoMotivoBaja->CurrentValue;
			$this->VehiculoMotivoBaja->ViewCustomAttributes = "";

			// VehiculoId
			$this->VehiculoId->LinkCustomAttributes = "";
			$this->VehiculoId->HrefValue = "";
			$this->VehiculoId->TooltipValue = "";

			// VehiculoDominio
			$this->VehiculoDominio->LinkCustomAttributes = "";
			$this->VehiculoDominio->HrefValue = "";
			$this->VehiculoDominio->TooltipValue = "";

			// VehiculoTipo
			$this->VehiculoTipo->LinkCustomAttributes = "";
			$this->VehiculoTipo->HrefValue = "";
			$this->VehiculoTipo->TooltipValue = "";

			// VehiculoDescripcion
			$this->VehiculoDescripcion->LinkCustomAttributes = "";
			$this->VehiculoDescripcion->HrefValue = "";
			$this->VehiculoDescripcion->TooltipValue = "";

			// VehiculoSucursal
			$this->VehiculoSucursal->LinkCustomAttributes = "";
			$this->VehiculoSucursal->HrefValue = "";
			$this->VehiculoSucursal->TooltipValue = "";

			// VehiculoMarca
			$this->VehiculoMarca->LinkCustomAttributes = "";
			$this->VehiculoMarca->HrefValue = "";
			$this->VehiculoMarca->TooltipValue = "";

			// VehiculoModelo
			$this->VehiculoModelo->LinkCustomAttributes = "";
			$this->VehiculoModelo->HrefValue = "";
			$this->VehiculoModelo->TooltipValue = "";

			// VehiculoCombustible
			$this->VehiculoCombustible->LinkCustomAttributes = "";
			$this->VehiculoCombustible->HrefValue = "";
			$this->VehiculoCombustible->TooltipValue = "";

			// VehiculoFechaBaja
			$this->VehiculoFechaBaja->LinkCustomAttributes = "";
			$this->VehiculoFechaBaja->HrefValue = "";
			$this->VehiculoFechaBaja->TooltipValue = "";
		}

		// Call Row Rendered event
		if ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)
			$this->Row_Rendered();
	}

	//
	// Delete records based on current filter
	//
	function DeleteRows() {
		global $conn, $Language, $Security;
		$DeleteRows = TRUE;
		$sSql = $this->SQL();
		$conn->raiseErrorFn = 'ew_ErrorFn';
		$rs = $conn->Execute($sSql);
		$conn->raiseErrorFn = '';
		if ($rs === FALSE) {
			return FALSE;
		} elseif ($rs->EOF) {
			$this->setFailureMessage($Language->Phrase("NoRecord")); // No record found
			$rs->Close();
			return FALSE;

		//} else {
		//	$this->LoadRowValues($rs); // Load row values

		}
		$conn->BeginTrans();

		// Clone old rows
		$rsold = ($rs) ? $rs->GetRows() : array();
		if ($rs)
			$rs->Close();

		// Call row deleting event
		if ($DeleteRows) {
			foreach ($rsold as $row) {
				$DeleteRows = $this->Row_Deleting($row);
				if (!$DeleteRows) break;
			}
		}
		if ($DeleteRows) {
			$sKey = "";
			foreach ($rsold as $row) {
				$sThisKey = "";
				if ($sThisKey <> "") $sThisKey .= $GLOBALS["EW_COMPOSITE_KEY_SEPARATOR"];
				$sThisKey .= $row['VehiculoId'];
				$conn->raiseErrorFn = 'ew_ErrorFn';
				$DeleteRows = $this->Delete($row); // Delete
				$conn->raiseErrorFn = '';
				if ($DeleteRows === FALSE)
					break;
				if ($sKey <> "") $sKey .= ", ";
				$sKey .= $sThisKey;
			}
		} else {

			// Set up error message
			if ($this->getSuccessMessage() <> "" || $this->getFailureMessage() <> "") {

				// Use the message, do nothing
			} elseif ($this->CancelMessage <> "") {
				$this->setFailureMessage($this->CancelMessage);
				$this->CancelMessage = "";
			} else {
				$this->setFailureMessage($Language->Phrase("DeleteCancelled"));
			}
		}
		if ($DeleteRows) {
			$conn->CommitTrans(); // Commit the changes
		} else {
			$conn->RollbackTrans(); // Rollback changes
		}

		// Call Row Deleted event
		if ($DeleteRows) {
			foreach ($rsold as $row) {
				$this->Row_Deleted($row);
			}
		}
		return $DeleteRows;
	}

	// Set up Breadcrumb
	function SetupBreadcrumb() {
		global $Breadcrumb, $Language;
		$Breadcrumb = new cBreadcrumb();
		$Breadcrumb->Add("list", $this->TableVar, "veh_vehiculoslist.php", $this->TableVar, TRUE);
		$PageId = "delete";
		$Breadcrumb->Add("delete", $PageId, ew_CurrentUrl());
	}

	// Page Load event
	function Page_Load() {

		//echo "Page Load";
	}

	// Page Unload event
	function Page_Unload() {

		//echo "Page Unload";
	}

	// Page Redirecting event
	function Page_Redirecting(&$url) {

		// Example:
		//$url = "your URL";

	}

	// Message Showing event
	// $type = ''|'success'|'failure'|'warning'
	function Message_Showing(&$msg, $type) {
		if ($type == 'success') {

			//$msg = "your success message";
		} elseif ($type == 'failure') {

			//$msg = "your failure message";
		} elseif ($type == 'warning') {

			//$msg = "your warning message";
		} else {

			//$msg = "your message";
		}
	}

	// Page Render event
	function Page_Render() {

		//echo "Page Render";
	}

	// Page Data Rendering event
	function Page_DataRendering(&$header) {

		// Example:
		//$header = "your header";

	}

	// Page Data Rendered event
	function Page_DataRendered(&$footer) {

		// Example:
		//$footer = "your footer";

	}
}
?>
<?php ew_Header(FALSE) ?>
<?php

// Create page object
if (!isset($veh_vehiculos_delete)) $veh_vehiculos_delete = new cveh_vehiculos_delete();

// Page init
$veh_vehiculos_delete->Page_Init();

// Page main
$veh_vehiculos_delete->Page_Main();

// Global Page Rendering event (in userfn*.php)
Page_Rendering();

// Page Rendering event
$veh_vehiculos_delete->Page_Render();
?>
<?php include_once "header.php" ?>
<script type="text/javascript">

// Page object
var veh_vehiculos_delete = new ew_Page("veh_vehiculos_delete");
veh_vehiculos_delete.PageID = "delete"; // Page ID
var EW_PAGE_ID = veh_vehiculos_delete.PageID; // For backward compatibility

// Form object
var fveh_vehiculosdelete = new ew_Form("fveh_vehiculosdelete");

// Form_CustomValidate event
fveh_vehiculosdelete.Form_CustomValidate = 
 function(fobj) { // DO NOT CHANGE THIS LINE!

 	// Your custom validation code here, return false if invalid. 
 	return true;
 }

// Use JavaScript validation or not
<?php if (EW_CLIENT_VALIDATE) { ?>
fveh_vehiculosdelete.ValidateRequired = true;
<?php } else { ?>
fveh_vehiculosdelete.ValidateRequired = false; 
<?php } ?>

// Dynamic selection lists
fveh_vehiculosdelete.Lists["x_VehiculoTipo"] = {"LinkField":"x_TipoId","Ajax":true,"AutoFill":false,"DisplayFields":["x_TipoNombre","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};
fveh_vehiculosdelete.Lists["x_VehiculoSucursal"] = {"LinkField":"x_sucursalId","Ajax":true,"AutoFill":false,"DisplayFields":["x_sucursalNombre","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};
fveh_vehiculosdelete.Lists["x_VehiculoMarca"] = {"LinkField":"x_MarcaId","Ajax":true,"AutoFill":false,"DisplayFields":["x_MarcaNombre","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};
fveh_vehiculosdelete.Lists["x_VehiculoModelo"] = {"LinkField":"x_ModeloId","Ajax":true,"AutoFill":false,"DisplayFields":["x_ModeloNombre","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};
fveh_vehiculosdelete.Lists["x_VehiculoCombustible"] = {"LinkField":"x_CombustibleId","Ajax":true,"AutoFill":false,"DisplayFields":["x_CombustibleNombre","","",""],"ParentFields":[],"FilterFields":[],"Options":[]};

// Form object for search
</script>
<script type="text/javascript">

// Write your client script here, no need to add script tags.
</script>
<?php

// Load records for display
if ($veh_vehiculos_delete->Recordset = $veh_vehiculos_delete->LoadRecordset())
	$veh_vehiculos_deleteTotalRecs = $veh_vehiculos_delete->Recordset->RecordCount(); // Get record count
if ($veh_vehiculos_deleteTotalRecs <= 0) { // No record found, exit
	if ($veh_vehiculos_delete->Recordset)
		$veh_vehiculos_delete->Recordset->Close();
	$veh_vehiculos_delete->Page_Terminate("veh_vehiculoslist.php"); // Return to list
}
?>
<?php $Breadcrumb->Render(); ?>
<?php $veh_vehiculos_delete->ShowPageHeader(); ?>
<?php
$veh_vehiculos_delete->ShowMessage();
?>
<form name="fveh_vehiculosdelete" id="fveh_vehiculosdelete" class="ewForm form-inline" action="<?php echo ew_CurrentPage() ?>" method="post">
<input type="hidden" name="t" value="veh_vehiculos">
<input type="hidden" name="a_delete" id="a_delete" value="D">
<?php foreach ($veh_vehiculos_delete->RecKeys as $key) { ?>
<?php $keyvalue = is_array($key) ? implode($EW_COMPOSITE_KEY_SEPARATOR, $key) : $key; ?>
<input type="hidden" name="key_m[]" value="<?php echo ew_HtmlEncode($keyvalue) ?>">
<?php } ?>
<table class="ewGrid"><tr><td class="ewGridContent">
<div class="ewGridMiddlePanel">
<table id="tbl_veh_vehiculosdelete" class="ewTable ewTableSeparate">
<?php echo $veh_vehiculos->TableCustomInnerHtml ?>
	<thead>
	<tr class="ewTableHeader">
<?php if ($veh_vehiculos->VehiculoId->Visible) { // VehiculoId ?>
		<td><span id="elh_veh_vehiculos_VehiculoId" class="veh_vehiculos_VehiculoId"><?php echo $veh_vehiculos->VehiculoId->FldCaption() ?></span></td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoDominio->Visible) { // VehiculoDominio ?>
		<td><span id="elh_veh_vehiculos_VehiculoDominio" class="veh_vehiculos_VehiculoDominio"><?php echo $veh_vehiculos->VehiculoDominio->FldCaption() ?></span></td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoTipo->Visible) { // VehiculoTipo ?>
		<td><span id="elh_veh_vehiculos_VehiculoTipo" class="veh_vehiculos_VehiculoTipo"><?php echo $veh_vehiculos->VehiculoTipo->FldCaption() ?></span></td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoDescripcion->Visible) { // VehiculoDescripcion ?>
		<td><span id="elh_veh_vehiculos_VehiculoDescripcion" class="veh_vehiculos_VehiculoDescripcion"><?php echo $veh_vehiculos->VehiculoDescripcion->FldCaption() ?></span></td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoSucursal->Visible) { // VehiculoSucursal ?>
		<td><span id="elh_veh_vehiculos_VehiculoSucursal" class="veh_vehiculos_VehiculoSucursal"><?php echo $veh_vehiculos->VehiculoSucursal->FldCaption() ?></span></td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoMarca->Visible) { // VehiculoMarca ?>
		<td><span id="elh_veh_vehiculos_VehiculoMarca" class="veh_vehiculos_VehiculoMarca"><?php echo $veh_vehiculos->VehiculoMarca->FldCaption() ?></span></td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoModelo->Visible) { // VehiculoModelo ?>
		<td><span id="elh_veh_vehiculos_VehiculoModelo" class="veh_vehiculos_VehiculoModelo"><?php echo $veh_vehiculos->VehiculoModelo->FldCaption() ?></span></td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoCombustible->Visible) { // VehiculoCombustible ?>
		<td><span id="elh_veh_vehiculos_VehiculoCombustible" class="veh_vehiculos_VehiculoCombustible"><?php echo $veh_vehiculos->VehiculoCombustible->FldCaption() ?></span></td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoFechaBaja->Visible) { // VehiculoFechaBaja ?>
		<td><span id="elh_veh_vehiculos_VehiculoFechaBaja" class="veh_vehiculos_VehiculoFechaBaja"><?php echo $veh_vehiculos->VehiculoFechaBaja->FldCaption() ?></span></td>
<?php } ?>
	</tr>
	</thead>
	<tbody>
<?php
$veh_vehiculos_delete->RecCnt = 0;
$i = 0;
while (!$veh_vehiculos_delete->Recordset->EOF) {
	$veh_vehiculos_delete->RecCnt++;
	$veh_vehiculos_delete->RowCnt++;

	// Set row properties
	$veh_vehiculos->ResetAttrs();
	$veh_vehiculos->RowType = EW_ROWTYPE_VIEW; // View

	// Get the field contents
	$veh_vehiculos_delete->LoadRowValues($veh_vehiculos_delete->Recordset);

	// Render row
	$veh_vehiculos_delete->RenderRow();
?>
	<tr<?php echo $veh_vehiculos->RowAttributes() ?>>
<?php if ($veh_vehiculos->VehiculoId->Visible) { // VehiculoId ?>
		<td<?php echo $veh_vehiculos->VehiculoId->CellAttributes() ?>>
<span id="el<?php echo $veh_vehiculos_delete->RowCnt ?>_veh_vehiculos_VehiculoId" class="control-group veh_vehiculos_VehiculoId">
<span<?php echo $veh_vehiculos->VehiculoId->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoId->ListViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoDominio->Visible) { // VehiculoDominio ?>
		<td<?php echo $veh_vehiculos->VehiculoDominio->CellAttributes() ?>>
<span id="el<?php echo $veh_vehiculos_delete->RowCnt ?>_veh_vehiculos_VehiculoDominio" class="control-group veh_vehiculos_VehiculoDominio">
<span<?php echo $veh_vehiculos->VehiculoDominio->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoDominio->ListViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoTipo->Visible) { // VehiculoTipo ?>
		<td<?php echo $veh_vehiculos->VehiculoTipo->CellAttributes() ?>>
<span id="el<?php echo $veh_vehiculos_delete->RowCnt ?>_veh_vehiculos_VehiculoTipo" class="control-group veh_vehiculos_VehiculoTipo">
<span<?php echo $veh_vehiculos->VehiculoTipo->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoTipo->ListViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoDescripcion->Visible) { // VehiculoDescripcion ?>
		<td<?php echo $veh_vehiculos->VehiculoDescripcion->CellAttributes() ?>>
<span id="el<?php echo $veh_vehiculos_delete->RowCnt ?>_veh_vehiculos_VehiculoDescripcion" class="control-group veh_vehiculos_VehiculoDescripcion">
<span<?php echo $veh_vehiculos->VehiculoDescripcion->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoDescripcion->ListViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoSucursal->Visible) { // VehiculoSucursal ?>
		<td<?php echo $veh_vehiculos->VehiculoSucursal->CellAttributes() ?>>
<span id="el<?php echo $veh_vehiculos_delete->RowCnt ?>_veh_vehiculos_VehiculoSucursal" class="control-group veh_vehiculos_VehiculoSucursal">
<span<?php echo $veh_vehiculos->VehiculoSucursal->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoSucursal->ListViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoMarca->Visible) { // VehiculoMarca ?>
		<td<?php echo $veh_vehiculos->VehiculoMarca->CellAttributes() ?>>
<span id="el<?php echo $veh_vehiculos_delete->RowCnt ?>_veh_vehiculos_VehiculoMarca" class="control-group veh_vehiculos_VehiculoMarca">
<span<?php echo $veh_vehiculos->VehiculoMarca->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoMarca->ListViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoModelo->Visible) { // VehiculoModelo ?>
		<td<?php echo $veh_vehiculos->VehiculoModelo->CellAttributes() ?>>
<span id="el<?php echo $veh_vehiculos_delete->RowCnt ?>_veh_vehiculos_VehiculoModelo" class="control-group veh_vehiculos_VehiculoModelo">
<span<?php echo $veh_vehiculos->VehiculoModelo->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoModelo->ListViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoCombustible->Visible) { // VehiculoCombustible ?>
		<td<?php echo $veh_vehiculos->VehiculoCombustible->CellAttributes() ?>>
<span id="el<?php echo $veh_vehiculos_delete->RowCnt ?>_veh_vehiculos_VehiculoCombustible" class="control-group veh_vehiculos_VehiculoCombustible">
<span<?php echo $veh_vehiculos->VehiculoCombustible->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoCombustible->ListViewValue() ?></span>
</span>
</td>
<?php } ?>
<?php if ($veh_vehiculos->VehiculoFechaBaja->Visible) { // VehiculoFechaBaja ?>
		<td<?php echo $veh_vehiculos->VehiculoFechaBaja->CellAttributes() ?>>
<span id="el<?php echo $veh_vehiculos_delete->RowCnt ?>_veh_vehiculos_VehiculoFechaBaja" class="control-group veh_vehiculos_VehiculoFechaBaja">
<span<?php echo $veh_vehiculos->VehiculoFechaBaja->ViewAttributes() ?>>
<?php echo $veh_vehiculos->VehiculoFechaBaja->ListViewValue() ?></span>
</span>
</td>
<?php } ?>
	</tr>
<?php
	$veh_vehiculos_delete->Recordset->MoveNext();
}
$veh_vehiculos_delete->Recordset->Close();
?>
</tbody>
</table>
</div>
</td></tr></table>
<div class="btn-group ewButtonGroup">
<button class="btn btn-primary ewButton" name="btnAction" id="btnAction" type="submit"><?php echo $Language->Phrase("DeleteBtn") ?></button>
</div>
</form>
<script type="text/javascript">
fveh_vehiculosdelete.Init();
</script>
<?php
$veh_vehiculos_delete->ShowPageFooter();
if (EW_DEBUG_ENABLED)
	echo ew_DebugMsg();
?>
<script type="text/javascript">

// Write your table-specific startup script here
// document.write("page loaded");

</script>
<?php include_once "footer.php" ?>
<?php
$veh_vehiculos_delete->Page_Terminate();
?>
